using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Demo.Net.Model
{
      public class RentRecord//租赁记录表
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }//id
        // [ForeignKey(nameof(Owner))]//外键
        public int OwnerId { get; set; }//业主ID
        public Owner? Owner { get; set; }
        // [ForeignKey(nameof(ParkingSpace))]
        public int ParkingSpaceId { get; set; }//车位ID
        public ParkingSpace? ParkingSpace { get; set; }
        [Required]
        public DateTime RentStartTime { get; set; }//租赁开始时间
        [Required]
        public DateTime RentEndTime { get; set; }//租赁结束时间
        // public Boolean IsDeleted{get;set;}//软删除
    }
}